<?xml version="1.0" encoding="UTF-8" ?>
<Module>
  <ModulePrefs title="__UP_my_name__" height="678" scrolling="false" width="335" scaling="false" title_url="http://www.grbasket.gr" description="Results, Αποτελέσματα |::| Display results in your blog or website " author="LaryT" author_email="terzisla@gmail.com" author_photo="https://lh5.googleusercontent.com/-fV5npoSYg1s/AAAAAAAAAAI/AAAAAAAAAAA/GuOR42Cme4M/s320/terzisla.jpg" author_link="http://www.grbasket.gr" author_aboutme="I am a webdeveloper and software programmer. Programming and scripting takes a huge part of my life routine. Every time I feel the passion to start a new creation. I work very hard with my favorite programming languages." screenshot="https://lh5.googleusercontent.com/-qKynsTsn0hQ/T0QNK4wlU6I/AAAAAAAAgKs/yO_77P0ZMm4/s275/box_match_center.png" thumbnail="https://lh5.googleusercontent.com/-qKynsTsn0hQ/T0QNK4wlU6I/AAAAAAAAgKs/yO_77P0ZMm4/s125/box_match_center.png" category="sport" category2="news" > 
    <Require feature="setprefs" />    
    <Require feature="dynamic-height" />
  </ModulePrefs>
  <UserPref name="my_name" display_name="Name" default_value="ResultsBox4Ugr" />
  <UserPref name="my_URLfeed" display_name="Resuls Sheet:" default_value="https://docs.google.com/spreadsheet/ccc?key=0AjrqMWGJ6suYdDc1MnBsc2d4Nl92ZGJZZGgwM3hwWEE#gid=0" />
  <UserPref name="my_URLrank" display_name="Rank Sheet:" default_value="https://docs.google.com/spreadsheet/ccc?key=0AjrqMWGJ6suYdDc1MnBsc2d4Nl92ZGJZZGgwM3hwWEE#gid=6" />
  <UserPref name="m_Language" display_name="Language (EN or GR):" default_value="GR" />
<Content type="html">
    
  <![CDATA[
<style>
*{margin:0;padding:0}.small-7{font-size:7px!important;font-weight:normal}.small-9{font-size:9px!important;font-weight:normal}.font-10{font-size:10px!important;font-weight:bold}.big{font-size:12px!important;font-weight:bold}.koyti{background-color:transparent}div.numDiv{cursor:pointer}div.periexomenaCL{height:550px;display:none}div#sourceIDBathm{display:block}.fpOther{height:549px;border-bottom:solid 1px #03273c;border-top:solid 0 white;overflow:hidden}body{background-color:transparent}#disDiv{background-color:#343437;border-top-left-radius:5px;border-top-right-radius:5px;top:74px;left:7px;width:300px;height:250px}#inDisplay{background-color:#e7e7e8;border:1px color white;width:298px;height:236px}#myTitleID{border-top:1px solid #444;color:#2222f2;font-size:14px;font-weight:bold;padding:3px 10px}.fpOtherInner{height:525px;width:100%;overflow:hidden}.fpEmbTitle1,.fpEmbTitle2,.fpEmbTitle3,.fpEmbTitle4{border:solid 1px #0b6ba5;cursor:pointer;font-family:Arial,Verdana,Geneva,Helvetica,sans-serif;text-transform:uppercase;color:white;font-size:12px;font-weight:bold;height:14px}.fpEmbTitle1{background-image:url('https://lh4.googleusercontent.com/-MQFtp5q089A/Tz4Q7LGVnRI/AAAAAAAAf9A/qeBQxYaHTfY/s24/blueBG.png');padding:3px 10px 3px 10px}.fpEmbTitle2{padding:3px 10px 3px 35px;background-image:url('https://lh5.googleusercontent.com/-ZfK9IGg7qeY/T0HuOBOLfgI/AAAAAAAAgIQ/sg6V6TWeqM8/s20/galdiplo1x67.png')}.fpEmbTitle3{padding:3px 10px 3px 50px;background-image:url('https://lh3.googleusercontent.com/-QN_NMo_a1YA/T0Hxm24eIZI/AAAAAAAAgIc/hnBUgXrg77Q/s20/gray_glosy1x60.png')}.fpEmbTitle4{padding:3px 10px 3px 65px;background-image:url('https://lh4.googleusercontent.com/-vhO393b6OJ4/T0LHvuxnPmI/AAAAAAAAgI0/ule1n_BfzII/s24/orange1x30.png')}.fpEmbTitle1 .icon{float:right;padding-top:6px;padding-right:10px}.fpEmbTitle2 .icon{float:right;padding-top:6px;padding-right:20px}.fpEmbTitle3 .icon{float:right;padding-top:6px;padding-right:30px}.fpEmbTitle4 .icon{float:right;padding-top:6px;padding-right:40px}.fpEmbCont1,.fpEmbCont2,.fpEmbCont3,fpEmbCont4{display:none;overflow:hidden}.fpOtherPfeil{text-align:center}.pad{border-bottom:1px solid #d6d6d6;padding-bottom:2px}.padBath{border-bottom:0 solid #d6d6d6;padding-bottom:1px}#theLoadingID{width:100%;height:100%}.theLoading{position:absolute;background-color:white;background-image:url('https://lh3.googleusercontent.com/-U1qC603CKXQ/TSOH_e4K4pI/AAAAAAAATiY/FWwWiU4QOl4/s50/loading.gif');background-repeat:no-repeat;background-position:50% 0;display:block}.scoreboard{clear:both;background-image:url(https://lh5.googleusercontent.com/-bIA3JYgMAzw/TObApoUYmcI/AAAAAAAATNU/Q171ifTcksE/s800/bkg.png);background-repeat-x:repeat;background-repeat-y:no-repeat;background-attachment:initial;background-position-x:50%;background-position-y:0;background-origin:initial;background-clip:initial;background-color:#dfdfdf}table.agonasRec{clear:both;border:1px solid #d6d6d6;border-bottom:3px solid #d6d6d6;font-family:Arial,Verdana,Geneva,Helvetica,sans-serif;padding-top:3px}table.agonasApotelesmataDiorRec{clear:both;border:0 solid #d6d6d6;border-bottom:1px solid #d6d6d6;font-family:Arial,Verdana,Geneva,Helvetica,sans-serif;padding-top:1px}table.bathmolRec{clear:both;border:1px solid #d6d6d6;border-bottom:0 solid #d6d6d6;font-family:Arial,Verdana,Geneva,Helvetica,sans-serif;padding-top:1px}td.emblhmaImg{margin:0;padding:0;border-bottom:1px solid #d6d6d6;padding-bottom:2px}img.emblhmaImg{height:24px;width:24px;border-radius: 12px;box-shadow: rgba(10, 10, 10, 0.9) 0 0 10px;-webkit-box-shadow: rgba(10, 10, 10, 0.9) 0 0 10px;-moz-box-shadow: rgba(10, 10, 10, 0.9) 0 0 10px;-o-box-shadow: rgba(10, 10, 10, 0.9) 0 0 10px;-ms-box-shadow: rgba(10, 10, 10, 0.9) 0 0 10px;margin-right: 10px;}td.emblhmaImgBathmo{margin:0;padding:0;border-bottom:1px solid #d6d6d6;padding-bottom:1px}img.emblhmaImgBathmo{height: 16px;width: 16px;border-radius: 8px;box-shadow: rgba(10, 10, 10, 0.9) 0 0 10px;-webkit-box-shadow: rgba(10, 10, 10, 0.9) 0 0 10px;-moz-box-shadow: rgba(10, 10, 10, 0.9) 0 0 10px;-o-box-shadow: rgba(10, 10, 10, 0.9) 0 0 10px;-ms-box-shadow: rgba(10, 10, 10, 0.9) 0 0 10px;margin-right: 10px;}img.ImgMapVI{margin:0;padding:0;height:9px;width:9px}img.ImgMapVIRight{float:right;text-align:right;margin:0;padding:0;height:12px;width:12px}.objImgVideoMap{border:1px solid gray;padding:5px;margin:1px;height:222px;width:283px}span.anametrhsh{color:black;text-decoration:none;cursor:pointer}a.anametrhsh{color:black;text-decoration:none;cursor:pointer}ul.tabG4{display:block;list-style:none;font-size:11px;margin:0 0 10px 0;font-family:Arial,Verdana,Geneva,Helvetica,sans-serif;font-size:10px}ul.tabG4 li{display:inline;font-size:10px;font-weight:bold;text-decoration:none}ul.tabG4 li a{font-size:14px;font-weight:bold;margin:10px 0 6px 0;color:black;padding:0 6px;text-decoration:none}ul.tabG4 li a.selected,ul.tabG4 li a:hover{background:#03273c url('https://lh4.googleusercontent.com/-MQFtp5q089A/Tz4Q7LGVnRI/AAAAAAAAf9A/qeBQxYaHTfY/s12/blueBG.png') repeat-x;color:white;border:1px solid #aaf;padding:0 5px;text-decoration:none}div.titleAgvnistikh{width:100%;background:#03273c url('https://lh4.googleusercontent.com/-MQFtp5q089A/Tz4Q7LGVnRI/AAAAAAAAf9A/qeBQxYaHTfY/s18/blueBG.png') repeat-x;border:1px solid #aaf;padding:0 5px}div.titleAgvnistikh a{color:white;font-size:12px;font-weight:bold;text-decoration:none}//#bathmologies-tab{z-index:30}#apotelesmata-tab{z-index:20}#myTabs{margin-bottom:-1px;position:relative;z-index:100;height:35px;display:block}#myTabs ul{margin-top:0}#myTabs ul li{display:inline-block;float:left;padding:.6em 1em;font:normal normal 14px Arial,Tahoma,Helvetica,FreeSans,sans-serif;color:#999;border-left:1px solid #fff;border-right:1px solid #eee;cursor:pointer}#myTabs ul li a{text-decoration:none}#mytabs ul li.tab-selected,#myTabs ul li.tab-selected a,#myTabs ul li a:hover,#myTabs ul li:hover{color:#000;background-color:#eee;text-decoration:none}#addiv{background-color: rgb(255, 255, 255);position: absolute;top: 40px;bottom: 5px;right: 0px;left: 0px;}.pClepikefalida{font-family:Verdana, Arial,sans-serif; font-size:12px; font-weight:bold;}.pClRow{font-family:Verdana, Arial,sans-serif; font-size:9px;}
</style>

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script src="http://www.google.com/jsapi" type="text/javascript"></script>

    <script type="text/javascript">
         google.load("visualization", "1");
    </script>

<script type="text/javascript">
  var prefs = new gadgets.Prefs();
  var myURLfeed = prefs.getString("my_URLfeed");
  var myURLrank = prefs.getString("my_URLrank");
  var mLanguage = prefs.getString("m_Language");
  
 if( mLanguage!="" ){
  }else{
    mLanguage ="GR";
  }



  var prosthetoID="";
  var pubID="";
  var posoPxScroll=70;
  
 

   if( myURLfeed!="" ){
     var query = new google.visualization.Query(myURLfeed);
   }

   if( myURLrank!="" ){
     var queryRank = new google.visualization.Query(myURLrank);
     var queryApotelesmataDiorg = new google.visualization.Query(myURLrank);
   }

//--- hmeromhnia apo eos symfvna me to central -7, +6hme
 var myToday = new Date();
 var strMinDate = new Date(Date.parse(myToday)-(7*24*60*60*1000));
 var strMaxDate = new Date(Date.parse(myToday)+(6*24*60*60*1000));
 var strAllDate = strMinDate.getDate()+'.'+(strMinDate.getMonth()+1)+'->' +strMaxDate.getDate()+'.'+(strMaxDate.getMonth()+1)+'.'+strMaxDate .getFullYear();
//-------------------------------



function embExpand(id,epiclass,URLforBathmologia)
{


  $(".fpEmbTitle"+ epiclass +" .icon").attr("src", "https://lh6.googleusercontent.com/-FlqMiSON9SM/TLcMIbO9tqI/AAAAAAAAS6U/-BQZAQgV5yw/s800/velaki_kato.png");  

  if ($("#fpEmbCont_" + id).is(":visible")){
 
     $("#fpEmbCont_" + id).find(".fpOtherInner").animate({"height" : "0px"}, function(){
       $("#fpEmbCont_" + id).hide();
     });
  
  }
  else {
    $(".fpEmbCont"+epiclass).hide(); 
    $("#fpEmbCont_" + id).find(".fpOtherInner").css({"height": 0});

    var nextEp = parseInt(epiclass)+1;
    var count =  $("#fpEmbCont_" + id).parent().find(".fpEmbCont"+ epiclass ).length;
    var availableHeight = $("#fpEmbCont_" + id).parent().height();
    $("#fpEmbCont_" + id).show();

     //--- periptvsh me 4 epipeda kai mono agvnistikes ypologizei ycos kai velaki

       $("#fpEmbCont_" + id).find(".fpOtherInner").animate({"height" : availableHeight - count*22});
       if (epiclass=='4'){
         $("#fpEmbCont_" + id).find(".fpOtherInner").animate({"height" : availableHeight - count*22 - 2*19});
       }
       if (epiclass=='3' && id.charAt(id.length - 1)=='a'){ 
         $("#fpEmbCont_" + id).find(".fpOtherInner").animate({"height" : availableHeight - count*22 - 2*19});
       }
       if (epiclass=='3' && id.charAt(id.length - 1)=='b'){ 
         $("#fpEmbCont_" + id).find(".fpOtherInner").animate({"height" : availableHeight - count*22 - 2*19});
       }
       if (epiclass=='1' && id.charAt(id.length - 1)=='e'){ 
         $("#fpEmbCont_" + id).find(".fpOtherInner").animate({"height" : availableHeight - count*22 - 2*19});
       }

    $("#fpEmbTitle_" + id).find(".icon").attr("src", "https://lh5.googleusercontent.com/-3BFmmhvzd_o/Tz-TLfcYrmI/AAAAAAAAf-M/rfkl33c1Jdk/s800/velaki_pano.png");  

     //-- elegxos an einai to 3o epipedo (teleytaio gia tiw bathmologis prepei na xtisei baumologies) 
     if (epiclass=='3' && id.charAt(id.length - 1)=='b'){ 
       pubID=id;

       makeBathmologia(URLforBathmologia);
     }

     //-- elegxos an einai to 3o epipedo (teleytaio gia to programma tvn agvnistikvn ths diorganvshs) 
     if (epiclass=='3' && id.charAt(id.length - 1)=='a'){ 
       pubID=id;
       makeApotelesmataDiorganvshs(URLforBathmologia);
     }

  } //--- end if (to if mazeyei to else aplonei)

}//---- end fnc expand

function scroll(id, direction, stepPX)
{
  var scrollTo = $("#fpOtherInner_" + id).scrollTop() + stepPX * direction;
  var scrollHeight = $("#fpOtherInner_" + id)[0].scrollHeight;
  var height = $("#fpOtherInner_" + id).height();
  if (scrollTo < 0) scrollTo = 0;
  if (scrollTo > scrollHeight - height) scrollTo = scrollHeight - height;
  $("#fpOtherInner_" + id).animate({scrollTop: scrollTo}, 300);
}

function scrolltoAgonistikh(id, stepPX)
{
  var scrollTo=stepPX;
  var scrollHeight = $("#fpOtherInner_" + id)[0].scrollHeight;
  var height = $("#fpOtherInner_" + id).height();
  if (scrollTo < 0) scrollTo = 0;
  if (scrollTo > scrollHeight - height) scrollTo = scrollHeight - height;
  $("#fpOtherInner_" + id).animate({scrollTop: scrollTo}, 3000);
}


//--- gia to display Div
function hideDivDisp(){
   $("#disDiv").animate({"top":"100px", "height" : "0px"}, function(){
        document.getElementById("inDisplay").innerHTML = "";
       $("#disDiv").hide();
     });
}

function showDivDisp(myURL,strHtml,isImgVideoMap){
   if ($("#disDiv").is(":visible")){
     hideDivDisp();
  }
   if ($("#addiv").is(":visible")){
     hideDivAds();
  }
  $("#disDiv").animate({"height" : "250px", "top":"74px"}, function(){
     if(isImgVideoMap=='Img'){
     document.getElementById("inDisplay").innerHTML = "<img src='"+ myURL +"' class='objImgVideoMap'  />"+strHtml;
     }
     if(isImgVideoMap=='Video'){
     document.getElementById("inDisplay").innerHTML = "<iframe src='"+ myURL +"?rel=0&autohide=1&showinfo=0' class='objImgVideoMap'  allowfullscreen  /></iframe>";
     }

     if(isImgVideoMap=='Map'){
     document.getElementById("inDisplay").innerHTML = "<iframe src='"+ myURL +"&t=h&output=embed' class='objImgVideoMap'  scrolling='no' marginheight='0' marginwidth='0' /></iframe>";
     }

       $("#disDiv").show();
    });
}


//--- gia ta ads
function hideDivAds(){
   $("#addiv").animate({"height" : "0px"}, function(){
       $("#addiv").hide();
     });
   $("#emfaniseAdsID").show();
}

function showDivAds(){

   $("#addiv").animate({"height" : "250px"}, function(){
       $("#addiv").show();
     });
   $("#emfaniseAdsID").hide();

}
function makeMarque(strForRoll){

  if(strForRoll !=""){
   document.getElementById("myTitleID").innerHTML = "<marquee scrollamount='4' onmouseover='this.stop();' onmouseout='this.start();' title='"+strForRoll + "'>"+strForRoll+"</marquee>";
  }else{
   document.getElementById("myTitleID").innerHTML = "";
  }

}


// --- gia ta tabs 

function selectTab (myID, myTab, myCaption, mLanguage ) {

//--- krybei perioxh  
    $(".periexomenaCL").hide();

    $("#myTabs li").removeClass("tab-selected");
//--- gia perioxh
    $("#"+myID).show();
//--- gia to tab
    $("#"+myTab).addClass("tab-selected");
//---
  if(myCaption !=""){
   document.getElementById("myTitleID").innerHTML = myCaption;
 }

//---
  if( myTab == "apotelesmata-tab" ){
   if (mLanguage =="EN"){
         document.getElementById("myTitleID").innerHTML = "Results";
     }
    sendQueryAgonistikes();
  }

  if(myTab == "bathmologies-tab"){  
     if (mLanguage =="EN"){
         document.getElementById("myTitleID").innerHTML = "Standings";
     }
    sendQueryBathmologia();
  }

  if(myTab == "ebdomada-tab"){  
    document.getElementById("myTitleID").innerHTML += "<span style='font-size:9px;'> (" + strAllDate +")</span>";
    document.getElementById("ebdomada-tab").title = "Οι αγώνες ανά ημέρα (" + strAllDate +")";
     if (mLanguage =="EN"){
       document.getElementById("ebdomada-tab").title = "Games / Day ";
       document.getElementById("myTitleID").innerHTML = "Schedule";
      }

    sendQueryEbdomadiaioAnaHmera();
  }

}

function init(){
 if (myURLfeed !=""){

 }
 else{
   document.getElementById("sourceID").innerHTML = "Δεν υπάρχει το αντίστοιχο URL του αρχείο των υπο παρακολούθηση κατηγοριών.  Παρακαλούμε από την επιλογή επεξεργασία των παραμέτρων, εισάγεται την αντίστοιη URL Διεύθυνση του Φύλλου των docs, με τον πίνακα των κατηγοριών  |..| There is no corresponding URL file of the monitored categories. Please edit the parameters, enter the URL address corresponding global sheet of googledocs, with the list of categories ... [more : grbasket@gmail.com]";
 }
}
//---- make ebdomadiaio programma
function sendQueryEbdomadiaioAnaHmera(){
   query.setQuery('select * where I is not null order by I, E, J');
   prosthetoID="_e";
   query.send(handleQueryResponseEbdomadiaioAnaHmera);
}

//---- make bathmologia
function sendQueryBathmologia() {
   queryRank.setQuery('select * order by B, D, F');
   prosthetoID="_b";
   posoPxScroll=70;
   queryRank.send(handleQueryResponseBathmologia);
}

//---- make agvnistikes
function sendQueryAgonistikes() {
   queryApotelesmataDiorg.setQuery('select * order by B, D, F');
   prosthetoID="_a";
   posoPxScroll=70;
   queryApotelesmataDiorg.send(handleQueryResponseBathmologia);
}


//---------------------------
//-------------- Ebdomadiaio/hmera
//---------------------------
function handleQueryResponseEbdomadiaioAnaHmera(response) {
   if (response.isError()) {
    alert('Error in query_members: ' + response.getMessage() + ' ' + response.getDetailedMessage());
    return;
  }
//---  GET THE DATA 
 var html =[];  
 var data = response.getDataTable();
 var posesEggrafes = data.getNumberOfRows();
 
 var strGroup1="";
 var strGroup2="";

 var countTitlesGroup1=0;
 var countTitlesGroup2=0;

 var exeiAnoixeiDivEpipedo1="";
 var exeiAnoixeiDivEpipedo2="";

 var strForCentralMarq="";


  html.push('<div valign="top" width="100%" id="otherContainer'+ prosthetoID +'">'); // ejvteriko kelifos epi 0
  html.push('<div class="fpOther" id="fpOther_1'+ prosthetoID +'" >'); // ejvteriko kelifos epi 1
  html.push('<div class="fpOtherInner" id="fpOtherInner_exo'+ prosthetoID +'" style="height: 550px;">'); // ejv kelifos epi 2

 for (var row = 0; row < posesEggrafes; row++) {

   if( strGroup1!= data.getFormattedValue(row, 8)){
     if (exeiAnoixeiDivEpipedo1 != data.getFormattedValue(row, 8) && exeiAnoixeiDivEpipedo1 !="" ){
       
         //---- 1o epipedo klisimo me velaki
         html.push('</div>');
         html.push('<div class="fpOtherPfeil"><img src="https://lh5.googleusercontent.com/-ENyeMpNZI4A/T0NTDCbJIsI/AAAAAAAAgKE/PgTGfC7yAdw/s30/velos_kato.png" border="0" onclick="scroll(&quot;'+ countTitlesGroup1 + prosthetoID +'&quot;, 1, 170)"></div> ');
         html.push('</div>');

     }//--- endif exeiAnoixeiDivEpipedo1

     countTitlesGroup1++;

     //---- dhmioyrgia titloy (anoigei kai kleinei to div toy den xrvstaei)
     html.push('<div class="fpEmbTitle1" onclick="embExpand(&quot;'+ countTitlesGroup1+prosthetoID+'&quot;,&quot;1&quot;)" id="fpEmbTitle_'+countTitlesGroup1+prosthetoID+'"><img src="https://lh6.googleusercontent.com/-FlqMiSON9SM/TLcMIbO9tqI/AAAAAAAAS6U/-BQZAQgV5yw/s12/velaki_kato.png" class="icon" alt="άνοιγμα - expand">'+data.getFormattedValue(row, 8)+'</div>');

     strGroup1 = data.getFormattedValue(row, 8);



     //----- dhmioyrgei paisio esokleistoy periexomenoy (afhnei 2 div anoixta)
     html.push('<div id="fpEmbCont_'+countTitlesGroup1+prosthetoID+'" class="fpEmbCont1" style="display: none;"> ');

      //---- velos pano
       html.push('<div class="fpOtherPfeil"><img src="https://lh6.googleusercontent.com/-ZuNCj1hzNww/T0NTC0-Hf9I/AAAAAAAAgJ8/evL6XwtD56E/s30/velos_epano.png" border="0" onclick="scroll(&quot;'+ countTitlesGroup1 + prosthetoID  + '&quot;, -1, 170)"> </div>');

     //---- to periblma periexomenoy epipedoy 1
     html.push('<div class="fpOtherInner" id="fpOtherInner_'+ countTitlesGroup1+prosthetoID+'" style="display: block; ">');

     exeiAnoixeiDivEpipedo1 = data.getFormattedValue(row, 8);

   }//-- endif strGroup1

 //-------------------   2o epipedo last epipedo gkavo epipedo mono titlos
 if( strGroup2 != data.getFormattedValue(row, 4)){

     countTitlesGroup2++;

      html.push('<div class="fpEmbTitle2" id="fpEmbTitle_'+countTitlesGroup1+'_'+ countTitlesGroup2+ prosthetoID +'">'+data.getFormattedValue(row, 4)+'</div>');

       strGroup2 = data.getFormattedValue(row, 4);
       exeiAnoixeiDivEpipedo2 = data.getFormattedValue(row, 4);


}

//--------
//--- gia kaue agvna
//--------
     strForCentralMarq = data.getFormattedValue(row,50)+ ' | ' + data.getFormattedValue(row,51)+ ' | ' + data.getFormattedValue(row,52);



   

     html.push('<div class="numDiv"   style="display: block;" onclick="makeMarque(&quot;'+ strForCentralMarq  + '&quot;)">');

     html.push('<table border="0" width="100%" cellspacing="0" cellpadding="0"><tbody>');
     
     html.push('<tr><td colspan="4"></td></tr>');

     html.push('<tr><td colspan="4"> <table width="100%" cellspacing="0" cellpadding="0" border="0" class="agonasRec scoreboard" ><tbody><tr>');

    // --  ----    1h seira omades - embhmata          -----   --

     html.push('<td class="pad font-10" width="30%" align="right">');

      //--- xarths ghpedoyxoy
     if (data.getFormattedValue(row, 58) != "" & data.getFormattedValue(row, 58) != "---" & data.getFormattedValue(row, 4) != "-" & data.getFormattedValue(row, 4) != "") {
       html.push('<img  class="ImgMapVI" src="https://lh6.googleusercontent.com/-wpkZlfBiqWY/TrpDw07IPQI/AAAAAAAAbhY/9QfyHOgWY1A/s800/maps_button.png" onclick="javascript:showDivDisp(&quot;'+data.getFormattedValue(row, 58)+'&quot;,&quot;&quot;,&quot;Map&quot;);">');
     }

     html.push('<span class="anametrhsh" >' + data.getFormattedValue(row, 11)+'</span></td>');

     if (data.getFormattedValue(row, 48) == "" || data.getFormattedValue(row, 48) == "---" ) {
       html.push('<td class="emblhmaImg" width="5%">&nbsp;</td>');     
     }else{
       html.push('<td class="emblhmaImg" width="5%" align="right"><img class="emblhmaImg" src="'+ data.getFormattedValue(row, 48) +'"></td>');
     }

     html.push('<td class="pad" width="1%">&nbsp;</td>');

     if (data.getFormattedValue(row, 49) == "" || data.getFormattedValue(row, 49) == "---" ){
       html.push('<td class="emblhmaImg" width="5%">&nbsp;</td>');     
     }else{
       html.push('<td class="emblhmaImg" width="5%" align="left"><img class="emblhmaImg" src="'+ data.getFormattedValue(row, 49) +'"></td>');
     }

     html.push('<td class="pad font-10" width="30%" align="left"><span class="anametrhsh">' + data.getFormattedValue(row, 12)+'</span></td>');

     html.push('</tr>');

     strDiathtes ='(R):'+data.getFormattedValue(row, 15) +', '+ data.getFormattedValue(row, 16)+' (K):'+ data.getFormattedValue(row, 17)+' (C):'+ data.getFormattedValue(row, 18)+', '+ data.getFormattedValue(row, 19) +', '+ data.getFormattedValue(row, 20) ;


     strHmeromhniesGhpeda = '<b>'+ data.getFormattedValue(row, 9)+ '</b> '+ data.getFormattedValue(row, 10)+ ' <span style="font-size:7px">( ' + data.getFormattedValue(row, 6) + ' ' + data.getFormattedValue(row, 7)+' '+ data.getFormattedValue(row, 8)+ ')</span>';

   strHmeromhniesGhpeda_t =   data.getFormattedValue(row, 9)+ '  '+ data.getFormattedValue(row, 10)+ ' ' + data.getFormattedValue(row, 6) + ' ' + data.getFormattedValue(row, 7)+' '+ data.getFormattedValue(row, 8);


     // --  ----    2h seira apotelesmata (an yparxei skor)         -----   --

     if(data.getFormattedValue(row, 13) > 0 || data.getFormattedValue(row, 14)>0 ){

     html.push('<tr title="'+strHmeromhniesGhpeda_t +' '+strDiathtes +'"><td colspan="2" align="right"><a href="javascript:void(0);" class="anametrhsh big">'+ data.getFormattedValue(row, 13)+ '</a></td>');
     html.push('<td align="center" class="noborder" style="padding:0 !important;"><img src="https://lh5.googleusercontent.com/-bIA3JYgMAzw/TObApoUYmcI/AAAAAAAATNU/Q171ifTcksE/s800/bkg.png" width="2" height="20" alt=""></td>');
     html.push('<td colspan="2" align="left"><span class="anametrhsh big">'+ data.getFormattedValue(row, 14)+ '</span>');



    //--- Img ghped
     if (data.getFormattedValue(row, 53) != "" & data.getFormattedValue(row, 53) != "---" ) {
       html.push('<img class="ImgMapVIRight" src="'+ data.getFormattedValue(row, 53) +'" onclick="javascript:showDivDisp(&quot;'+data.getFormattedValue(row, 53)+'&quot;,&quot;&quot;,&quot;Img&quot;);">');
     }

    //--- Img filox
     if (data.getFormattedValue(row, 54) != "" & data.getFormattedValue(row, 54) != "---" ) {
       html.push('<img   class="ImgMapVIRight" src="'+ data.getFormattedValue(row, 54) +'" onclick="javascript:showDivDisp(&quot;'+data.getFormattedValue(row, 54)+'&quot;,&quot;&quot;,&quot;Img&quot;);">');
     }

    //--- Yt video ghped
     if (data.getFormattedValue(row, 55) != "" & data.getFormattedValue(row, 55) != "---" ) {
       html.push('<img   class="ImgMapVIRight" src="https://lh5.googleusercontent.com/-C9Aewsj5onQ/TLFNrD07k3I/AAAAAAAAS3M/8zOAyhYgMFs/s800/youtube.png" onclick="javascript:showDivDisp(&quot;'+data.getFormattedValue(row, 55) +'&quot;,&quot;&quot;,&quot;Video&quot;);">');
     } 

     //--- Yt video filox
     if (data.getFormattedValue(row, 56) != "" & data.getFormattedValue(row, 56) != "---" ) {
       html.push('<img  class="ImgMapVIRight" src="https://lh5.googleusercontent.com/-C9Aewsj5onQ/TLFNrD07k3I/AAAAAAAAS3M/8zOAyhYgMFs/s800/youtube.png" onclick="javascript:showDivDisp(&quot;'+data.getFormattedValue(row, 56) +'&quot;,&quot;&quot;,&quot;Video&quot;);">');
     }

     html.push('</td></tr>');

}   else {

    //   ----    2h seira prin ton agvna stoixeia (an den yparxei skor)   ---    
     html.push('<tr><td colspan="5"  align="center"><span class="anametrhsh small-9">'+ strHmeromhniesGhpeda + '</span></td></tr>' );

    // ----    2h seira prin ton agvna stoixeia DIATHTES-KOMISARIOI-KRITES (an den yparxei skor) --
     html.push('<tr><td colspan="5"  align="center" title="'+strDiathtes+'"><span class="anametrhsh small-7">'+ strDiathtes+ '</span></td></tr>' );
}
     html.push('</tbody></table></td></tr>' );

     html.push('</tbody></table></div>');

}//-- end for

  //--------------------
  //---- kleinei ta 2 anoixta div apo to 2o epipedo (ths teleytaias eggrafhs)
  //-------------------
//      html.push('</div>');
//      html.push('</div>');
  //--------------------
  //---- kleinei ta 2 anoixta div apo to 1o epipedo (ths teleytaias eggrafhs)
  //-------------------
      html.push('</div>');
      html.push('</div>');
  //----- afoy kleisei ta anoixta div apo to for tvn eggrafvn
  //----- kleinei ta teleytaia 3 ektos for kaibazei kai mia grammh bashs

  html.push('</div>'); // ejvteriko kelifos epi 2(fpOtherInner)

  html.push('<img id="grammhImg'+prosthetoID+'" src="https://lh3.googleusercontent.com/-b7pEJ6xh9m4/Tz90h9bkhyI/AAAAAAAAf9c/5tA3miUdA38/s1/pix1black.gif"  height="1" />');

  html.push('</div>'); // end ejvteriko kelifos epi 1  (fpOther)
  html.push('</div>'); // end of ejvteriko kelifos epi 0

 //-- apodosei html sto iD 
  document.getElementById("sourceIDebdanahmera").innerHTML = html.join('');
  

}// endif ebdomadiaio/hmera

//---------------------------
//-------------- Bathmologia
//---------------------------
function handleQueryResponseBathmologia(response) {
   if (response.isError()) {
    alert('Error in query_members: ' + response.getMessage() + ' ' + response.getDetailedMessage());
    return;
  }
//---  GET THE DATA 
 var html =[];  
 var data = response.getDataTable();

 var posesEggrafes = data.getNumberOfRows();
 var strGroup1="";
 var strGroup2="";
 var strGroup3="";

 var countTitlesGroup1=0;
 var countTitlesGroup2=0;
 var countTitlesGroup3=0;

 var exeiAnoixeiDivEpipedo1="";
 var exeiAnoixeiDivEpipedo2="";
 var exeiAnoixeiDivEpipedo3="";

  html.push('<div valign="top" width="100%" id="otherContainer'+ prosthetoID +'">'); // ejvteriko kelifos epi 0

  html.push('<div class="fpOther" id="fpOther_1'+ prosthetoID +'" >'); // ejvteriko kelifos epi 1
  html.push('<div class="fpOtherInner" id="fpOtherInner_exo'+ prosthetoID +'" style="height: 550px;">'); // ejv kelifos epi 2


 for (var row = 0; row < posesEggrafes; row++) {

   if( strGroup1!= data.getFormattedValue(row, 0)){

     if (exeiAnoixeiDivEpipedo1 != data.getFormattedValue(row, 0) && exeiAnoixeiDivEpipedo1 !="" ){

         if ( exeiAnoixeiDivEpipedo3 !="" ){
             //---- to klisimo me t periblma tvn agvnvn  3o epipedo me velaki
             html.push('</div>');
             //---- kato velos  -------
             html.push('<div class="fpOtherPfeil"><table><tbody><tr><td id="katovelosIndex_'+countTitlesGroup1 +'_'+ countTitlesGroup2+'_'+ countTitlesGroup3 + prosthetoID+'" width="250">&nbsp;</td><td width="60"><img src="https://lh5.googleusercontent.com/-ENyeMpNZI4A/T0NTDCbJIsI/AAAAAAAAgKE/PgTGfC7yAdw/s30/velos_kato.png" border="0" onclick="scroll(&quot;'+ countTitlesGroup1 +'_'+ countTitlesGroup2+'_'+ countTitlesGroup3 + prosthetoID +'&quot;, 1, posoPxScroll )"></td></tr></tbody></table></div>');

             //--- to klisimo gia to geniko periex;omeno -- fpEmbCont_  --
             html.push('</div>'); 
             //--- alert(' close div 3-> p');
 
             exeiAnoixeiDivEpipedo3 ="";
         } //--- endif exei anoixto 3 epipedo
         
         if ( exeiAnoixeiDivEpipedo2 !="" ){
            //---- 2o epipedo klisimo me periblma an yparxei anoixto
             html.push('</div>');
             //--- to klisimi toy emfcont 2o epipedo
             html.push('</div>');
             exeiAnoixeiDivEpipedo2 ="";
         }
         //---- 1o epipedo klisimo me periblma
         html.push('</div>');
         //---- to klisimi toy emfcont
         html.push('</div>');

     }//--- endif exeiAnoixeiDivEpipedo1

     countTitlesGroup1++;

     //---- dhmioyrgia titloy (anoigei kai kleinei to div toy den xrvstaei)
     html.push('<div class="fpEmbTitle1" onclick="embExpand(&quot;'+ countTitlesGroup1+prosthetoID+'&quot;,&quot;1&quot;)" id="fpEmbTitle_'+countTitlesGroup1+prosthetoID+'"><img src="https://lh6.googleusercontent.com/-FlqMiSON9SM/TLcMIbO9tqI/AAAAAAAAS6U/-BQZAQgV5yw/s12/velaki_kato.png" class="icon" alt="άνοιγμα - expand">'+data.getFormattedValue(row, 0)+'</div>');

     strGroup1 = data.getFormattedValue(row, 0);

     //----- dhmioyrgei paisio esokleistoy periexomenoy (afhnei 2 div anoixta)
     html.push('<div id="fpEmbCont_'+countTitlesGroup1+prosthetoID+'" class="fpEmbCont1" style="display: none;"> ');
     //---- to periblma periexomenoy epipedoy 1
     html.push('<div class="fpOtherInner" id="fpOtherInner_'+ countTitlesGroup1+prosthetoID+'" style="display: block; ">');

       exeiAnoixeiDivEpipedo1 = data.getFormattedValue(row, 0);

   }//-- endif strGroup1

   //-------------------   2o epipedo
   if( strGroup2!= data.getFormattedValue(row, 2)){

     if (exeiAnoixeiDivEpipedo2 != data.getFormattedValue(row, 2) && exeiAnoixeiDivEpipedo2 !="" ){

         if ( exeiAnoixeiDivEpipedo3 !="" ){
             //---- to klisimo me t periblma tvn agvnvn  3o epipedo me velaki
             html.push('</div>');
             //---- kato velos  -------
             html.push('<div class="fpOtherPfeil"><table><tbody><tr><td id="katovelosIndex_'+countTitlesGroup1 +'_'+ countTitlesGroup2+'_'+ countTitlesGroup3 + prosthetoID+'" width="250">&nbsp;</td><td width="60"><img src="https://lh5.googleusercontent.com/-ENyeMpNZI4A/T0NTDCbJIsI/AAAAAAAAgKE/PgTGfC7yAdw/s30/velos_kato.png" border="0" onclick="scroll(&quot;'+ countTitlesGroup1 +'_'+ countTitlesGroup2+'_'+ countTitlesGroup3 + prosthetoID +'&quot;, 1, posoPxScroll )"></td></tr></tbody></table></div>');

             //--- to klisimo gia to geniko periex;omeno -- fpEmbCont_  --
             html.push('</div>'); 
             //--- alert(' close div 3-> p');
 
             exeiAnoixeiDivEpipedo3 ="";
         } //--- endif exei anoixto 3 epipedo

         //---- to klisimo me t periblma tvn agvnvn  2o epipedo
         html.push('</div>');
           //---- to kleisimo to content  
         html.push('</div>');
     }
       countTitlesGroup2++;

       html.push('<div class="fpEmbTitle2" onclick="embExpand(&quot;'+ countTitlesGroup1 +'_'+ countTitlesGroup2 + prosthetoID +'&quot;,&quot;2&quot;)" id="fpEmbTitle_'+countTitlesGroup1+'_'+ countTitlesGroup2+ prosthetoID+'"><img src="https://lh6.googleusercontent.com/-FlqMiSON9SM/TLcMIbO9tqI/AAAAAAAAS6U/-BQZAQgV5yw/s12/velaki_kato.png" class="icon" alt="άνοιγμα - expand">'+data.getFormattedValue(row, 2)+'</div>');

       strGroup2 = data.getFormattedValue(row, 2);

       html.push('<div id="fpEmbCont_'+countTitlesGroup1 +'_'+ countTitlesGroup2+prosthetoID +'" class="fpEmbCont2" style="display:none;">');
       //---- to periblma periexomenoy epipedoy 2
       html.push('<div class="fpOtherInner" id="fpOtherInner_'+ countTitlesGroup1 +'_'+ countTitlesGroup2+prosthetoID+'" style="display: block; ">');

       exeiAnoixeiDivEpipedo2 = data.getFormattedValue(row, 2);

   } //---endif epipedo 2


 //-------------------   3o epipedo last epipedo
 if( strGroup3 != data.getFormattedValue(row, 4)){

     if (exeiAnoixeiDivEpipedo3 != data.getFormattedValue(row, 4) && exeiAnoixeiDivEpipedo3 !="" ){
             //---- to klisimo me t periblma tvn agvnvn  3o epipedo me velaki
             html.push('</div>');
             //---- kato velos  -------
             html.push('<div class="fpOtherPfeil"><table><tbody><tr><td id="katovelosIndex_'+countTitlesGroup1 +'_'+ countTitlesGroup2+'_'+ countTitlesGroup3 + prosthetoID+'" width="250">&nbsp;</td><td width="60"><img src="https://lh5.googleusercontent.com/-ENyeMpNZI4A/T0NTDCbJIsI/AAAAAAAAgKE/PgTGfC7yAdw/s30/velos_kato.png" border="0" onclick="scroll(&quot;'+ countTitlesGroup1 +'_'+ countTitlesGroup2+'_'+ countTitlesGroup3 + prosthetoID +'&quot;, 1, posoPxScroll )"></td></tr></tbody></table></div>');



             //--- to klisimo gia to geniko periex;omeno -- fpEmbCont_  --
             html.push('</div>'); 
     }
     countTitlesGroup3++;

      html.push('<div class="fpEmbTitle3" onclick="embExpand(&quot;'+ countTitlesGroup1 +'_'+ countTitlesGroup2+'_'+ countTitlesGroup3+ prosthetoID   +'&quot;,&quot;3&quot;,&quot;'+data.getFormattedValue(row, 7)+'&quot;)" id="fpEmbTitle_'+countTitlesGroup1+'_'+ countTitlesGroup2+'_'+ countTitlesGroup3+ prosthetoID +'"><img src="https://lh6.googleusercontent.com/-FlqMiSON9SM/TLcMIbO9tqI/AAAAAAAAS6U/-BQZAQgV5yw/s12/velaki_kato.png" class="icon" alt="άνοιγμα - expand">'+data.getFormattedValue(row, 4)+'</div>');


       strGroup3 = data.getFormattedValue(row, 4);

       html.push('<div id="fpEmbCont_'+countTitlesGroup1 +'_'+ countTitlesGroup2 +'_'+ countTitlesGroup3 + prosthetoID +'" class="fpEmbCont3" style="display:none;">');

      //---- velos pano

       html.push('<div class="fpOtherPfeil"><img src="https://lh6.googleusercontent.com/-ZuNCj1hzNww/T0NTC0-Hf9I/AAAAAAAAgJ8/evL6XwtD56E/s30/velos_epano.png" border="0"  onclick="scroll(&quot;'+ countTitlesGroup1 +'_'+ countTitlesGroup2+'_'+ countTitlesGroup3+ prosthetoID  + '&quot;, -1, posoPxScroll)"> &nbsp;&nbsp;<a href="'+ data.getFormattedValue(row, 7) +'&single=true&gid=0&range=a1%3Ap1000&output=html" target="_blank"><img src="https://lh4.googleusercontent.com/-rYvi7HuZqko/UIfiwSPbRsI/AAAAAAAAvms/j_YV_l8yzdk/s800/icoSpSheet.png" /></a> </div>' );
       
       //---- to periblma gia toys agones
       html.push('<div class="fpOtherInner" id="fpOtherInner_'+ countTitlesGroup1 +'_'+ countTitlesGroup2+'_'+ countTitlesGroup3 + prosthetoID + '" style="height: 336px; display: block;" >');

       exeiAnoixeiDivEpipedo3 = data.getFormattedValue(row, 4);
}



 }//-- end for

  //--------------------
  //---- kleinei ta 2 anoixta div apo to 3o epipedo (edv einai to last epi)(exei kai belaki to 3epi) (ths teleytaias eggrafhs)
  //-------------------
             html.push('</div>');  //--- prota kleinei to periblhma agvnvn

             html.push('<div class="fpOtherPfeil"><table><tbody><tr><td id="katovelosIndex_'+countTitlesGroup1 +'_'+ countTitlesGroup2+'_'+ countTitlesGroup3 + prosthetoID+'" width="250">&nbsp;</td><td width="60"><img src="https://lh5.googleusercontent.com/-ENyeMpNZI4A/T0NTDCbJIsI/AAAAAAAAgKE/PgTGfC7yAdw/s30/velos_kato.png" border="0" onclick="scroll(&quot;'+ countTitlesGroup1 +'_'+ countTitlesGroup2+'_'+ countTitlesGroup3 + prosthetoID +'&quot;, 1, posoPxScroll )"></td></tr></tbody></table></div>');

             html.push('</div>');
  //--------------------
  //---- kleinei ta 2 anoixta div apo to 2o epipedo (ths teleytaias eggrafhs)
  //-------------------
      html.push('</div>');
      html.push('</div>');
  //--------------------
  //---- kleinei ta 2 anoixta div apo to 1o epipedo (ths teleytaias eggrafhs)
  //-------------------
      html.push('</div>');
      html.push('</div>');
  //----- afoy kleisei ta anoixta div apo to for tvn eggrafvn
  //----- kleinei ta teleytaia 3 ektos for kaibazei kai mia grammh bashs

  html.push('</div>'); // ejvteriko kelifos epi 2(fpOtherInner)

  html.push('<img id="grammhImg'+prosthetoID+'" src="https://lh3.googleusercontent.com/-b7pEJ6xh9m4/Tz90h9bkhyI/AAAAAAAAf9c/5tA3miUdA38/s1/pix1black.gif"  height="1" />');

  html.push('</div>'); // end ejvteriko kelifos epi 1  (fpOther)
  html.push('</div>'); // end of ejvteriko kelifos epi 0


 //-- apodosei html sto iD agvnistikews h bathmologies
 if(prosthetoID == "_a"){
  document.getElementById("sourceID").innerHTML = html.join('');
 }

 if (prosthetoID == "_b"){
  document.getElementById("sourceIDBathm").innerHTML = html.join('');
 }


} //--- end handleQueryResponseBathmologia


//---------------------------
//----------ktizei memonomens bathmologie ana kathgoria
//---------------------------
function makeBathmologia(URLforBathmologia){

   if( URLforBathmologia!="" ){
     var queryBathKathgorias = new google.visualization.Query(URLforBathmologia);
     var strSQL ="select AC, AD, AE, AF, AI,AJ,AM,AN,AO,AP,AQ,AR,AS,AT,AU,AV where  AE is not null  order by AE";
     queryBathKathgorias.setQuery(strSQL);
     queryBathKathgorias.send(handleQueryBathKathgoriasResponse);
          //-------- trexon docs
     

   }else{
     alert('Δεν βρέθηκε το αρχείο με τις βαθμολογίες της κατηγορίας...');
          //-------- trexon docs
     
   }

}//--- end fnc makeBathmologia

//---------------------------
//----------ktizei anejarthtoys pinakew apotelesmata Diorganvshs ana agvnistikvn
//---------------------------
function makeApotelesmataDiorganvshs(URLforBathmologia){

   if( URLforBathmologia!="" ){
     var queryApotelesmataDiorganvsh = new google.visualization.Query(URLforBathmologia);
     var strSQL ="select B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, AW, AX, AY, AZ, BA, BB, BC, BD, BE, BG where Q<>'' order by Q, D, E";
     queryApotelesmataDiorganvsh.setQuery(strSQL);
     queryApotelesmataDiorganvsh.send(handleQueryApotelesmataDiorgResponse);
          //-------- trexon docs     
     
   }else{
     alert('Δεν βρέθηκε το αρχείο με τα αποτελέσματα της διοργανώσης - κατηγορίας...');
          //-------- trexon docs
   }

}//--- end fnc makeApotelesmataDiorganvshs


//-----------------------
//---- To anejarthta handleQueryApotelesmataDiorgResponse 
//-----------------------
function handleQueryApotelesmataDiorgResponse(response){

  if (response.isError()) {
    alert('Error in query_members: ' + response.getMessage() + ' ' + response.getDetailedMessage());
    return;
  }
//---  GET THE DATA 
  var html =[];  
  var htmlkatovelos=[];
  var data = response.getDataTable();

  var strGroup1="";
  var countAgvnistikes=0;
  var shmeioScroll=0;

  var strFontSize="7px";
  var strColor="black";

  var tmpHtmlF="";
  var strForCentralMarq="";


  var myToday = new Date();
  var poses_omades_sthn_kathgoria = data.getNumberOfRows();

  for (var row = 0; row < poses_omades_sthn_kathgoria; row++) {

 //-------------------   2o epipedo last epipedo gkavo epipedo mono titlos
 if( strGroup1 != data.getFormattedValue(row, 0)){
      html.push('<div class="fpEmbTitle4">'+data.getFormattedValue(row, 0)+'</div>');
      strGroup1 = data.getFormattedValue(row, 0);
      //--- index gia scroll
      countAgvnistikes++;
      shmeioScroll=(row*40)+((countAgvnistikes-1)*22);

       if( data.getValue(row, 2) > myToday ){
        strFontSize="8px;font-weight:bold;";
        strColor="blue";
      }

     htmlkatovelos.push('<span title="Go to... Μετάβαση...['+data.getFormattedValue(row, 0)+']" style="font-size:'+ strFontSize + ';cursor:pointer;color:' + strColor + ';"  onclick="scrolltoAgonistikh(&quot;'+ pubID + '&quot;,'+ shmeioScroll+')">'+ countAgvnistikes +' </span>');
  }

//--------
//--- gia kaue agvna
//--------
     strForCentralMarq = data.getFormattedValue(row,18)+ ' | ' + data.getFormattedValue(row,19)+ ' | ' + data.getFormattedValue(row,20);

     html.push('<div class="numDiv"  style="display: block;" onclick="makeMarque(&quot;'+ strForCentralMarq  + '&quot;)">');
     html.push('<table border="0" width="100%" cellspacing="0" cellpadding="0" ><tbody>');
     html.push('<tr><td colspan="6"></td></tr>');
     html.push('<tr><td colspan="6"> <table width="100%" cellspacing="0" cellpadding="0" border="0" class="agonasApotelesmataDiorRec scoreboard"><tbody><tr>');


    // --  ----    1h seira omades - embhmata          -----   --

     html.push('<td class="pad font-10" width="30%" align="right">');

      //--- xarths ghpedoyxoy
     if (data.getFormattedValue(row, 25) != "" & data.getFormattedValue(row, 25) != "---" & data.getFormattedValue(row, 4) != "-" & data.getFormattedValue(row, 4) != "") {
       html.push('<img   class="ImgMapVI" src="https://lh6.googleusercontent.com/-wpkZlfBiqWY/TrpDw07IPQI/AAAAAAAAbhY/9QfyHOgWY1A/s800/maps_button.png" onclick="javascript:showDivDisp(&quot;'+data.getFormattedValue(row, 25)+'&quot;,&quot;'+tmpHtmlF+'&quot;,&quot;Map&quot;);">');
     }

     html.push('<span class="anametrhsh">' + data.getFormattedValue(row, 5)+'</span></td>');

     if (data.getFormattedValue(row, 16) == "" || data.getFormattedValue(row, 16) == "---" ) {
       html.push('<td class="emblhmaImgBathmo" width="5%">&nbsp;</td>');     
     }else{
       html.push('<td class="emblhmaImgBathmo" width="5%" align="right"><img class="emblhmaImgBathmo" src="'+ data.getFormattedValue(row, 16) +'"></td>');
     }
     html.push('<td class="pad" width="1%">&nbsp;</td>');

     if (data.getFormattedValue(row, 17) == "" || data.getFormattedValue(row, 17) == "---" ){
       html.push('<td class="emblhmaImgBathmo" width="5%">&nbsp;</td>');     
     }else{
       html.push('<td class="emblhmaImgBathmo" width="5%" align="left"><img class="emblhmaImgBathmo" src="'+ data.getFormattedValue(row, 17) +'"></td>');
     }

     html.push('<td class="pad font-10" width="30%" align="left"><span class="anametrhsh">' + data.getFormattedValue(row, 6)+'</span></td>');

     html.push('</tr>');

     strDiathtes ='(R):'+data.getFormattedValue(row, 9) +', '+ data.getFormattedValue(row, 10)+' (K):'+ data.getFormattedValue(row, 11)+' (C):'+ data.getFormattedValue(row, 12)+', '+ data.getFormattedValue(row, 13) +', '+ data.getFormattedValue(row, 14) ;

     strHmeromhniesGhpeda = data.getFormattedValue(row, 0) +' '+ data.getFormattedValue(row, 1)+' '+ data.getFormattedValue(row, 2)+' '+ data.getFormattedValue(row, 3)+' '+ data.getFormattedValue(row, 4) ;


     // --  ----    2h seira apotelesmata (an yparxei skor)    
     
     if(data.getFormattedValue(row, 7) > 0 || data.getFormattedValue(row, 8)>0 ){


     html.push('<tr title="'+strHmeromhniesGhpeda +' '+strDiathtes +'"><td colspan="2" align="right">');
     html.push('<a href="javascript:void(0);" class="anametrhsh big">'+ data.getFormattedValue(row, 7)+ '</a></td>');
     html.push('<td align="center" class="noborder" style="padding:0 !important;"><img src="https://lh5.googleusercontent.com/-bIA3JYgMAzw/TObApoUYmcI/AAAAAAAATNU/Q171ifTcksE/s800/bkg.png" width="2" height="16" alt=""></td>')
     html.push('<td colspan="2" align="left"><span class="anametrhsh big">'+ data.getFormattedValue(row, 8)+ '</span>');


    //--- Img ghped
     if (data.getFormattedValue(row, 21) != "" & data.getFormattedValue(row, 21) != "---" ) {
       html.push('<img  class="ImgMapVIRight" src="'+ data.getFormattedValue(row, 21) +'" onclick="javascript:showDivDisp(&quot;'+data.getFormattedValue(row, 21)+'&quot;,&quot;'+tmpHtmlF+'&quot;,&quot;Img&quot;);">');
     }

    //--- Img filox
     if (data.getFormattedValue(row, 22) != "" & data.getFormattedValue(row, 22) != "---" ) {
       html.push('<img   class="ImgMapVIRight" src="'+ data.getFormattedValue(row, 22) +'" onclick="javascript:showDivDisp(&quot;'+data.getFormattedValue(row, 22)+'&quot;,&quot;'+tmpHtmlF+'&quot;,&quot;Img&quot;);">');
     }

    //--- Yt video ghped
     if (data.getFormattedValue(row, 23) != "" & data.getFormattedValue(row, 23) != "---" ) {
       html.push('<img   class="ImgMapVIRight" src="https://lh5.googleusercontent.com/-C9Aewsj5onQ/TLFNrD07k3I/AAAAAAAAS3M/8zOAyhYgMFs/s800/youtube.png" onclick="javascript:showDivDisp(&quot;'+data.getFormattedValue(row, 23) +'&quot;,&quot;'+tmpHtmlF+'&quot;,&quot;Video&quot;);">');
     } 

     //--- Yt video filox
     if (data.getFormattedValue(row, 24) != "" & data.getFormattedValue(row, 24) != "---" ) {
       html.push('<img   class="ImgMapVIRight" src="https://lh5.googleusercontent.com/-C9Aewsj5onQ/TLFNrD07k3I/AAAAAAAAS3M/8zOAyhYgMFs/s800/youtube.png" onclick="javascript:showDivDisp(&quot;'+data.getFormattedValue(row, 24) +'&quot;,&quot;'+tmpHtmlF+'&quot;,&quot;Video&quot;);">');
     }

     html.push('</td></tr>');

}   else {

    //   ----    2h seira prin ton agvna stoixeia (an den yparxei skor)   ---    

     html.push('<tr><td colspan="6"  align="center"><span class="anametrhsh small-9">'+ strHmeromhniesGhpeda + '</span>' );

     html.push('</td></tr>' );

    // ----    2h seira prin ton agvna stoixeia DIATHTES-KOMISARIOI-KRITES (an den yparxei skor) --

     html.push('<tr><td colspan="6"  align="center" title="'+strDiathtes+'"><span class="anametrhsh small-7">'+ strDiathtes+ '</span></td></tr>' );
}
     html.push('</tbody></table></td></tr>' );

     html.push('</tbody></table></div>');


 }//--- end for

  var strIDpinakas= "fpOtherInner_"+pubID;
  document.getElementById(strIDpinakas).innerHTML = html.join('');

  //--- xtizei ta indexscroll sto katv velaki
  strIDpinakas= "katovelosIndex_"+pubID;
  document.getElementById(strIDpinakas).innerHTML = htmlkatovelos.join('');

}//--- end handleQueryApotelesmataDiorgResponse 

//-----------------------
//---- To anejarthta handleQueryBathKathgoriasResponse 
//-----------------------
function handleQueryBathKathgoriasResponse(response){

  if (response.isError()) {
    alert('Error in query_members: ' + response.getMessage() + ' ' + response.getDetailedMessage());
    return;
  }
  

//---  GET THE DATA 
  var html =[];  
  var data = response.getDataTable();

  var strIsobathmies="";
  var poses_omades_sthn_kathgoria = data.getNumberOfRows();

  var pano_orio=data.getFormattedValue(0, 0);
  var kato_orio=data.getFormattedValue(0, 1);

  var titleEktyposh=data.getFormattedValue(0, 2);
 
  for (var row = 0; row < poses_omades_sthn_kathgoria; row++) {

     strIsobathmies=data.getFormattedValue(row, 13)+" "+data.getFormattedValue(row, 14);
     
     if(kato_orio!="" ){
        if(data.getFormattedValue(row, 2) == kato_orio){ html.push('<hr/>');}
     }

     html.push('<div class="numDiv" style="display: block;" >');
     html.push('<table border="0" width="100%" cellspacing="0" cellpadding="0"><tbody>');
     html.push('<tr><td colspan="10"></td></tr>');
     html.push('<tr><td colspan="10"> <table width="100%" cellspacing="0" cellpadding="0" border="0" class="bathmolRec scoreboard" ><tbody><tr>');

    if( data.getFormattedValue(row, 2) != titleEktyposh ) {

    //-- sthlh 1
       html.push('<td class="padBath small-9" width="3%" align="left">'+data.getFormattedValue(row, 2)+'</td>');   
     
    //-- sthlh 2 emblhma
     if (data.getFormattedValue(row, 15) == "" || data.getFormattedValue(row, 15) == "---" ) {
       html.push('<td class="emblhmaImgBathmo" width="3%"align="left" >&nbsp;</td>');     
     }else{
       html.push('<td class="emblhmaImgBathmo" width="3%" align="left"><img class="emblhmaImgBathmo" src="'+ data.getFormattedValue(row, 15) +'"></td>');
     }
   
    //-- sthlh 3 omada
     html.push('<td class="padBath small-9" width="33%" align="left"> <span class="anametrhsh">' + data.getFormattedValue(row, 3)+'</span></td>');

    //-- sthlh 4 bathmoi
     html.push('<td class="padBath small-9" width="5%" align="right" title="P"><span class="anametrhsh"><b>' + data.getFormattedValue(row, 4) +'</b></span></td>');
    
     //-- sthlh 5 agones
     html.push('<td class="padBath small-9" width="5%" align="right" title="Games" ><span class="anametrhsh" >' + data.getFormattedValue(row, 5) +'</span></td>');

     //-- sthlh 6 nikes/ht
     html.push('<td class="padBath small-9" width="7%" align="right" title="W | D" ><span class="anametrhsh" >' + data.getFormattedValue(row, 6)+ '</span>|<span class="anametrhsh">' + data.getFormattedValue(row, 7)+'</span></td>');

     //-- sthlh 7 mhd
     if(data.getFormattedValue(row, 8) != '0' ){
       html.push('<td class="padBath small-9" width="3%" align="right" title="Z"><span class="anametrhsh" >' + data.getFormattedValue(row, 8)+'</span></td>');
     }else{
       html.push('<td class="padBath small-9" width="3%" align="right" title="Z"><span class="anametrhsh">&nbsp;</span></td>');
     }

     //-- sthlh 8
     html.push('<td class="padBath small-9" width="8%" align="right" title="pts A | D"><span class="anametrhsh" >' + data.getFormattedValue(row, 9)+'</span>-<span class="anametrhsh">' + data.getFormattedValue(row, 10)+'</span></td>');

     //-- sthlh 9
     html.push('<td class="padBath small-9" width="6%" align="right" title="Pts difference"><span class="anametrhsh" >' + data.getFormattedValue(row, 11)+'</span></td>');

     //-- sthlh 10
     if(data.getFormattedValue(row, 12) !=''){
          html.push('<td class="padBath small-9" width="3%" align="right" title="'+strIsobathmies+'"><span class="anametrhsh" >' +data.getFormattedValue(row, 12)+'</span></td>');
     }else{
          html.push('<td class="padBath small-9" width="3%" align="left" title="'+strIsobathmies+'"><span class="anametrhsh">&nbsp;</span></td>');
     }

  }else{   // an einai h prvth seira dhladh exei to koytaki =0
     html.push('<td class="padBath small-9" colspan="10"><center><b>&nbsp;</b></center></td>');
  }        // endif exei periexomeno bathmologiko

  html.push('</tr></tbody></table></td></tr>' );

  html.push('</tbody></table></div>');

       if(pano_orio !="" ){
         if(data.getFormattedValue(row, 2) == pano_orio){ html.push('<hr/>')};
       }
   }//--- end for

  var strIDpinakas= "fpOtherInner_"+pubID;
  document.getElementById(strIDpinakas).innerHTML = html.join('');

}//--- end funchandleQueryBathKathgoriasResponse


//---------------------------
//----------ktizei memonomens bathmologie ana kathgoria
//---------------------------
function makeBathmologia(URLforBathmologia){

   if( URLforBathmologia!="" ){
     var queryBathKathgorias = new google.visualization.Query(URLforBathmologia);
     var strSQL ="select AC, AD, AE, AF, AI,AJ,AM,AN,AO,AP,AQ,AR,AS,AT,AU,AV where  AE is not null  order by AE";
     queryBathKathgorias.setQuery(strSQL);
     queryBathKathgorias.send(handleQueryBathKathgoriasResponse);

   }else{
     alert('No source file detect. Δεν βρέθηκε το αρχείο με τις βαθμολογίες της κατηγορίας...');

   }

}//--- end fnc makeBathmologia

gadgets.util.registerOnLoadHandler(init);  

</script>

<div id="disDiv" style="position:absolute;display:none;"><center>
<a id="apokrychDisplay" href="javascript:hideDivDisp();" style="text-decoration:none;font-size:9px;color:#e7e7e8;height:10px;" title="απόκρυψη - hide">X</a><br/>
<div id="inDisplay" >load...φορτώνει..
</div>
</center>
</div>


<div class="koyti">

   <div id="pano-tmhma" >
   <div id="myTabs">
   <ul>
     <li id="bathmologies-tab"><a href="javascript:void(0);" onclick="javascript:selectTab('sourceIDBathm','bathmologies-tab', 'Βαθμολογίες', mLanguage);return false;" id="bathmologies-tab-a">Βαθμολογίες</a></li>
     <li id="apotelesmata-tab" ><a onclick="javascript:selectTab('sourceID','apotelesmata-tab', 'Οι αγώνες των διοργανώσεων', mLanguage);return false;" id="apotelesmata-tab-a">Πρόγραμμα</a></li>
     <li id="ebdomada-tab"><a onclick="javascript:selectTab('sourceIDebdanahmera','ebdomada-tab', 'Ανά ημέρα οι αγώνες',mLanguage );return false;" id="ebdomada-tab-a">Ανά Ημέρα</a></li>
     </ul>
   </div>
 </div>
 <div>
    <div id="myTitleID"><marquee>Πρόγραμμα Αγώνων Διοργανώσεων - Αποτελέσματα - Βαθμολογικοί Πίνακες </marquee></div>
    <div id="sourceIDebdanahmera" class="periexomenaCL"><span style="font-size:9px;">&nbsp;</span></div>
    <div id="sourceID" class="periexomenaCL"><span style="font-size:9px;">.</span></div>
    <div id="sourceIDBathm" class="periexomenaCL">.</div>
  </div>

<center>

<div id="addiv"><p class="pClepikefalida"><br/><br/><br/>Welcome to GameCenter <br/>12th FIMBA World Maxibasketball Championship Thessaloniki 2013<br/><br/></p>
<p class="pClRow">All the  Games, Groups, Results, Standings with a easy way.</p>
<p class="pClRow">1st Step : Click the "X" button to continue.</p>
<p class="pClRow">2nd Step : Select at the top the tab-category.</p>
<p class="pClRow">3rd Step : Select the Age Category, the Group and the Round.</p>
<p class="pClRow">They are 2 Rounds at every Group <br/></p>



<div id="addiv" style="position:absolute;top:180px;left:10px;"><center>
<a id="apokrychID" href="javascript:hideDivAds();" style="text-decoration:none;font-size:11px;color:black;height:12px;" title="απόκρυψη - hide ads">X</a><br/>
<script type="text/javascript"><!--
google_ad_client = "ca-pub-9529818444792202";
/* 300 x 250 box match center */
google_ad_slot = "7816887262";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></center>
</div>
<p style="position:absolute;bottom:0px;border-top:1px solid silver;" class="pClRow"><span style="font-size:9px;color:gray;" >Please note that the Dates, Gyms, Referees of the Games will be updated one week before the Games</span></p>

<!-- span style="position:absolute;bottom:0px;font-size:9px;color:gray;height:10px;" >GameCenter &nbsp;</span><a id="emfaniseAdsID" href="javascript:showDivAds();" style="text-decoration:none;font-size:9px;color:gray;height:10px;" title="εμφάνιση - show ads">|&nbsp;≙</a><br/-->
</center>


</div>

    <script>
    gadgets.window.adjustHeight();

       
       if (mLanguage =="EN"){
      
        document.getElementById("myTitleID").innerHTML="<marquee>Schedule - Results - Standings </marquee>";
        document.getElementById("bathmologies-tab-a").innerHTML="Standings";
        document.getElementById("apotelesmata-tab-a").innerHTML="Results";
        document.getElementById("ebdomada-tab-a").innerHTML="Schedule";
       }
    </script>

    ]]>
  </Content>
</Module>

